<template>
  <div>
    <input placeholder="输入关键字搜索" v-model.trim="uname" >
    <MyFrom :list="modify"></MyFrom>
  </div>
</template>

<script>
import MyFrom from './components/MyFrom.vue'
// import NotiFication from './components/NotiFication.vue'
export default{
  components:{
    MyFrom,
  },
  data(){
    return {
      uname:'',
      list: [
        {
          date:'2020-12-12',
          uname:'李四',
          result:'健康',
          information:'感冒药',
        },
        {
          date:'2020-1-12',
          uname:'张三',
          result:'健康',
          information:'感冒药',
        },
        {
          date:'2020-7-12',
          uname:'王五',
          result:'不健康',
          information:'发烧药',
        },
      ],
    }
  },

  computed:{
    modify(){
      return this.list.filter(item=>{
        return item.date.includes(this.uname) || 
        item.uname.includes(this.uname) || 
        item.result.includes(this.uname) ||
        item.information.includes(this.uname) 
      })
    },
  },
  

}
</script>

<style scoped>
  
</style>

